/**  
 * All rights Reserved, Designed By <a href="www.itttq.com" target="_blank">www.itttq.com</a>
 * @date:   2017-07-21 11:42:21
 * @Copyright: 2017 <a href="www.itttq.com" target="_blank">www.itttq.com</a> Inc. All rights reserved. 
 */
package com.itttq.gshop.pbpm.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Lang;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;

import com.itttq.gshop.domain.po.SysUserPo;
import com.itttq.gshop.pbpm.cmpt.mybatis.CustomInLanguage;
import com.itttq.gshop.pbpm.provider.SysUserSqlProvider;

@Mapper
public interface ISysUserMapper {
	/**
	 * 新增SysUserPo对象
	 * 
	 * @param SysUserPo
	 * @Author 迷蝶
	 * @return Integer
	 */
	@InsertProvider(type=SysUserSqlProvider.class,  method="addSysUser") 
	public Integer addSysUser(SysUserPo sysUser);

	/**
	 * 更新SysUserPo对象
	 * 
	 * @param sysUserPo
	 * @Author 迷蝶
	 * @return Integer
	 */
	@UpdateProvider(type=SysUserSqlProvider.class,  method="updateSysUser") 
	public Integer updateSysUser(SysUserPo sysUser);
	
	/**
	 * 根据ID删除SysUserPo对象
	 * 
	 * @param id
	 * @Author 迷蝶
	 * @return Integer
	 */
	@DeleteProvider(type=SysUserSqlProvider.class,  method="delSysUser") 
	public Integer delSysUserById(Integer id);

	/**
	 * 根据IDS删除SysUserPo对象
	 * 
	 * @param ids
	 * @Author 迷蝶
	 * @return List<SysUserPo>
	 */
	@Lang(CustomInLanguage.class)
	@Delete("DELETE FROM sys_user WHERE id IN (#{ids})")
	public Integer delSysUserByIds(@Param("ids") List<Integer> ids);
	
	/**
	 * 根据条件查找SysUserPo对象，默认根据ID降序
	 * 
	 * @param sysUserPo
	 * @Author 迷蝶
	 * @return List<SysUserPo>
	 */
	@SelectProvider(type=SysUserSqlProvider.class,  method="findSysUsers") 
	public List<SysUserPo> findSysUsers(SysUserPo sysUser);
	
	/**
	 * 根据条件查找记录总数
	 * 
	 * @param sysUserPo
	 * @Author 迷蝶
	 * @return Integer
	 */
	@SelectProvider(type=SysUserSqlProvider.class,  method="findSysUserCount") 
	public Integer findSysUserCount(SysUserPo sysUser);

	/**
	 * 根据ID查找SysUserPo对象
	 * 
	 * @param id
	 * @Author 迷蝶
	 * @return SysUserPo
	 */
	@SelectProvider(type=SysUserSqlProvider.class,  method="findSysUserById") 
	public SysUserPo findSysUserById(Integer id);
	
}